package com.iyjhsoc.game.domain.dto;

import lombok.Data;

import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

@Data
public class CompetitionSmallTeamInfoDTO {
    private Map<String,PlayerChooseDTO> positionMapA;
    private Map<String,PlayerChooseDTO> positionMapB;
    private String gameName;
    private Long matchTime;
    private Long gameTime;
    private GameKillInfoDTO oneKill;
    private String victoryTeam;
    private Date competitionDate;
    private Long matchId;
    private Long competitionSmallGameId;


    public void setPositionMapA(List<PlayerChooseDTO> positionMapA) {
        Map<String,PlayerChooseDTO> list = new HashMap<>();
        for(PlayerChooseDTO playerChooseDTO:positionMapA){
            list.put(playerChooseDTO.getPosition(),playerChooseDTO);
        }
        this.positionMapA = list;
    }

    public void setPositionMapB(List<PlayerChooseDTO> positionMapB) {
        Map<String,PlayerChooseDTO> list = new HashMap<>();
        for(PlayerChooseDTO playerChooseDTO:positionMapB){
            list.put(playerChooseDTO.getPosition(),playerChooseDTO);
        }
        this.positionMapB = list;
    }

}
